using System;

namespace Jaws.Core.Web
{
    /// <summary>
    /// All extensions must decorate the class with this attribute.
    /// It is used for reflection.
    /// <remarks>
    /// When using this attribute, you must make sure
    /// to have a default constructor. It will be used to create
    /// an instance of the extension through reflection.
    /// </remarks>
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class ExtensionAttribute : Attribute
    {
        /// <summary>
        /// Creates an instance of the attribute and assigns a description.
        /// </summary>
        public ExtensionAttribute(string description, string version, string author)
        {
            Description = description;
            Version = version;
            Author = author;
        }

        /// <summary>
        /// Gets the description of the extension.
        /// </summary>
        public string Description { get; private set; }

        /// <summary>
        /// Gets the version number of the extension
        /// </summary>
        public string Version { get; private set; }

        /// <summary>
        /// Gets the author of the extension
        /// </summary>
        public string Author { get; private set; }
    }
}